﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace ArtMath.Window
{
    public partial class InputBoxWindow : Form
    {
        public InputBoxWindow(string title, string prompt)
        {
            InitializeComponent();
            Text = title;
            label1.Text = prompt;
        }
        public string InputContent
        {
            get { return textBox1.Text; }
        }
        private void btnCancel_Click(object sender, EventArgs e)
        {
            DialogResult = DialogResult.Cancel;
        }

        private void btnOK_Click(object sender, EventArgs e)
        {
            DialogResult = DialogResult.OK;
        }

        private void textBox1_TextChanged(object sender, EventArgs e)
        {
            btnOK.Enabled = textBox1.TextLength > 0;
        }
    }
}
